import { lazy } from 'react'

const Data = lazy(() => import('../../views/Index/Data'))
var Category = lazy(() => import('../../views/Index/Data/category/Category'))
var Region = lazy(() => import('../../views/Index/Data/region/Region'))
var Sort = lazy(() => import('../../views/Index/Data/sort/Sort'))
var ProductLine = lazy(() => import('../../views/Index/Data/productLine/ProductLine'))

const Form = lazy(() => import('../../views/Index/Form'))
var Attribute = lazy(() => import('../../views/Index/Form/attribute/Attribute'))
var Menu = lazy(() => import('../../views/Index/Form/menu/Menu'))

export default [
    {
        path: '/index/data',
        element: <Data />,
        children: [
            {
                path: '/index/data/region',
                element: <Region />,
            },
            {
                path: '/index/data/category',
                element: <Category />,
            },
            {
                path: '/index/data/sort',
                element: <Sort />,
            },
            {
                path: '/index/data/productLine',
                element: <ProductLine />,
            },
        ]
    },
    {
        path: '/index/form',
        element: <Form />,
        children: [
            {
                path: '/index/form/attribute',
                element: <Attribute />,
            },
            {
                path: '/index/form/Menu',
                element: <Menu />,
            },
        ]
    },
]